<?php
$RowVN			= $interfaces_class->GetByName('contact_me_vn');
$RowEN			= $interfaces_class->GetByName('contact_me_en');
$RowMapVN		= $interfaces_class->GetByName('map_vn');
$RowMapEN		= $interfaces_class->GetByName('map_en');
$contentVN		= $func->GetSession('contentVN');
$contentEN		= $func->GetSession('contentEN');
$MapVN			= $func->GetSession('map_VN');
$MapEN			= $func->GetSession('map_EN');
if(is_array($RowVN)){
	$contentVN	= $RowVN[0]['content'];
}
if(is_array($RowMapVN)){
	$contentEN	= $RowEN[0]['content'];
}
if(is_array($RowMapEN)){
	$MapVN		= $RowMapVN[0]['content'];
}
if(is_array($RowEN)){
	$MapEN		= $RowMapEN[0]['content'];
}
$ErrorQ 		= $func->GetSession('admin_fasle');
$func->DelSession('contentVN');
$func->DelSession('contentEN');
$func->DelSession('map_VN');
$func->DelSession('map_EN');
$func->DelSession('admin_fasle');
?>
<div class="dataTables db">
	<div class="dataTables_bar db">
    	<h5 class="title dib"><?php echo $config_nc->Information;?> <?php echo $config_nc->Contact_Us;?></h5>        
    </div><!--end dataTables_bar-->
    <div class="themuser db">
        <form class="form-centent" action="<?php echo $WEB_DOMAIN;?>/<?php echo $WEB_ADMIN;?>/index.php?u1=_contact-me" method="post">
        	<ul class="nd db">
            	<li>
                    <label class="span2 fl">&nbsp;</label>
                    <span class="errorq"><?php if(isset($ErrorQ)){echo $ErrorQ;}?>&nbsp;</span>
                </li>
            	<li>
                    <label class="span2 fl">
                    	<?php echo $config_nc->Information;?> (Tiếng Việt)
                    </label>
                    <textarea id="contentVN" name="contentVN" >
                    	<?php echo $contentVN;?>
                    </textarea>
                    <script type="text/javascript">
						CKEDITOR.replace('contentVN',{
							filebrowserBrowseUrl : 'public/FCKeditor/ckfinder/ckfinder.html',
							filebrowserImageBrowseUrl : 'public/FCKeditor/ckfinder/ckfinder.html?type=Images',
							filebrowserFlashBrowseUrl : 'public/FCKeditor/ckfinder/ckfinder.html?type=Flash',
							filebrowserUploadUrl : 'public/FCKeditor/ckfinder/core/connector/php/connector.php?command=QuickUpload&type=Files',
							filebrowserImageUploadUrl : 'public/FCKeditor/ckfinder/core/connector/php/connector.php?command=QuickUpload&type=Images',
							filebrowserFlashUploadUrl : 'public/FCKeditor/ckfinder/core/connector/php/connector.php?command=QuickUpload&type=Flash',
						});
					</script> 
                </li> 
                <li>
                    <label class="span2 fl">
                    	<?php echo $config_nc->Information;?> (English)
                    </label>
                    <textarea id="contentEN" name="contentEN" >
                    	<?php echo $contentEN;?>
                    </textarea>
                    <script type="text/javascript">
						CKEDITOR.replace('contentEN',{
							filebrowserBrowseUrl : 'public/FCKeditor/ckfinder/ckfinder.html',
							filebrowserImageBrowseUrl : 'public/FCKeditor/ckfinder/ckfinder.html?type=Images',
							filebrowserFlashBrowseUrl : 'public/FCKeditor/ckfinder/ckfinder.html?type=Flash',
							filebrowserUploadUrl : 'public/FCKeditor/ckfinder/core/connector/php/connector.php?command=QuickUpload&type=Files',
							filebrowserImageUploadUrl : 'public/FCKeditor/ckfinder/core/connector/php/connector.php?command=QuickUpload&type=Images',
							filebrowserFlashUploadUrl : 'public/FCKeditor/ckfinder/core/connector/php/connector.php?command=QuickUpload&type=Flash',
						});
					</script> 
                </li>              
                <li>
                    <label class="span2 fl">
                    	<?php echo $config_nc->Map;?> (Việt)
                    </label>
                    <input name="mapvn" type="text" class="span3" value="<?php echo $MapVN;?>" id="ImageUrl" >
                    <input type="button" value="<?php echo $config_nc->Library;?>" id="btnSelectImg" name="" />					
                    <script type="text/javascript">
                        $(document).ready(function () {
                            $("#btnSelectImg").click(function () {
                                var finder = new CKFinder();
                                finder.selectActionFunction = function (fileUrl) {
                                    $('#ImageUrl').val(fileUrl);
                                };
                                finder.popup();
                            });
                        });
                     </script>
                </li>
                <li>
                    <label class="span2 fl">
                    	<?php echo $config_nc->Map;?> (USA)
                    </label>
                    <input name="mapen" type="text" class="span3" value="<?php echo $MapVN;?>" id="ImageUrlen" >
                    <input type="button" value="<?php echo $config_nc->Library;?>" id="btnSelectImgen" name="" />					
                    <script type="text/javascript">
                        $(document).ready(function () {
                            $("#btnSelectImgen").click(function () {
                                var finder = new CKFinder();
                                finder.selectActionFunction = function (fileUrl) {
                                    $('#ImageUrlen').val(fileUrl);
                                };
                                finder.popup();
                            });
                        });
                     </script>
                </li>  
            </ul>
            <div class="form-actions db">      
            	<button type="submit"><?php echo $config_nc->Accept;?></button>    
            </div><!--end form-actions-->
        </form>
    </div>
</div><!--end dataTables-->